import request from '@/config/axios'

export interface EnrollClueVO {
  id: string
  memberId: string
  clientName: string
  clientPhone: string
  clientAddress: string
  clientRemark: string
  studentEnrollClueId: string
  validDays: number
  createTime: number
  updateTime: number
}

export type EnrollClueDTO = Partial<EnrollClueVO>

const baseURL = '/train/enroll-clue'

// 查询用户列表
export const getPage = async (params) => {
  return await request.get({ url: `${baseURL}/page`, params })
}

// 查询用户详情
export const get = async (id: string) => {
  return await request.get({ url: `${baseURL}/get?id=` + id })
}

// 新增用户
export const create = async (data: EnrollClueVO) => {
  return await request.post({ url: `${baseURL}/create`, data })
}

// 修改用户
export const update = async (data: EnrollClueVO) => {
  return await request.put({ url: `${baseURL}/update`, data })
}

// 删除用户
export const del = async (id: string) => {
  return await request.delete({ url: `${baseURL}/delete?id=` + id })
}
